package problema040;

public class ChampernownesConstant {
	
	public static void main(String[] args){
		System.out.println(prodPot10());
	}
	
	public static int prodPot10(){
		int res = 1;
		String num = "";
		for(int i = 1; num.length() < 1000001; i++){
			System.out.println(num.length());
			num += Integer.toString(i);
		}
		for(int i = 1; i < 1000001; i*=10){
			res *= num.charAt(i-1) - 48;
		}
		return res; //es 210
	}
	
	

}
